home *** CD-ROM | disk | FTP | other *** search
/ Club KidSoft Volume 3 #2 / CKSPCV32.BIN / movies / clubart.dir / 00015_Script_Frame Bar < prev    next >
Text File  |  1995-04-06  |  4KB  |  99 lines

  1. -- Frame Bar   
  2. on mouseDown
  3.   global gSpriteThumb
  4.   global gCurrentButton
  5.   
  6.   global gArtPlay
  7.   global gArtFrame 
  8.   global gArtFrameBarStep
  9.   global gArtFrameBarH
  10.   global gArtFrameBarV
  11.   global gArtPlay
  12.   global gArtSprite1
  13.   global gArtSprite2
  14.   global gArtSprite3
  15.   global gArtSprite4
  16.   global gArtPositionSprite1
  17.   global gArtPositionSprite2
  18.   global gArtPositionSprite3
  19.   global gArtPositionSprite4
  20.   global gArtMarker, gArtMarkerSprite
  21.   global gArtCast1
  22.   global gArtCast2
  23.   global gArtCast3
  24.   global gArtCast4
  25.   -- check the button because of timing
  26.   
  27.   puppetSprite gArtMarkerSprite, TRUE
  28.   if(gArtPlay = FALSE and gCurrentButton = 5) then
  29.     set the castNum of sprite gSpriteThumb to the number of cast "MKRCLICK.PIC"
  30.     updateStage
  31.     
  32.     repeat while the mouseDown -- and rollover(gCurrentButton)
  33.       set place = (the mouseH  -  gArtFrameBarH) / gArtFrameBarStep
  34.       set nextFrame = place +1
  35.       if nextFrame > 15 then set nextFrame to 15
  36.       if nextFrame < 1 then set nextFrame to 1
  37.       if(gArtFrame <> nextFrame) then
  38.         set gArtFrame = nextFrame
  39.         set the locH of sprite gArtSprite1 to  getAt(getAt(gArtPositionSprite1, gArtFrame), 1)
  40.         set the locV of sprite gArtSprite1  to  getAt(getAt(gArtPositionSprite1, gArtFrame), 2)
  41.         
  42.         set the locH  of sprite gArtSprite2  to  getAt(getAt (gArtPositionSprite2, gArtFrame), 1)
  43.         set the locV  of sprite gArtSprite2  to  getAt(getAt (gArtPositionSprite2, gArtFrame), 2)
  44.         
  45.         set the locH  of sprite gArtSprite3 to  getAt(getAt (gArtPositionSprite3, gArtFrame), 1)
  46.         set the locV  of sprite gArtSprite3  to  getAt(getAt (gArtPositionSprite3, gArtFrame), 2)
  47.         
  48.         set the locH  of sprite gArtSprite4 to  getAt(getAt (gArtPositionSprite4, gArtFrame), 1)
  49.         set the locV  of sprite gArtSprite4  to  getAt(getAt (gArtPositionSprite4, gArtFrame), 2)
  50.         
  51.         set  the castNum of sprite gArtSprite1 to getAt (gArtCast1, gArtFrame)
  52.         set  the castNum of sprite gArtSprite2 to getAt (gArtCast2, gArtFrame)
  53.         set  the castNum of sprite gArtSprite3 to getAt (gArtCast3, gArtFrame)
  54.         set  the castNum of sprite gArtSprite4 to getAt (gArtCast4, gArtFrame)
  55.         
  56.         set the locH  of sprite gArtMarkerSprite to  getAt (gArtMarker, gArtFrame)
  57.         updateStage
  58.       end if
  59.     end repeat
  60.   end if
  61.   puppetSprite gArtMarkerSprite, FALSE
  62. end  
  63.  
  64. -- Frame Bar   
  65. on mouseUp
  66.   global gSpriteThumb
  67.   global gArtFrame 
  68.   global gArtFrameBarStep
  69.   global gArtFrameBarH
  70.   global gArtFrameBarV
  71.   global gArtPlay
  72.   global gArtSprite1
  73.   global gArtSprite2
  74.   global gArtSprite3
  75.   global gArtSprite4
  76.   global gArtPositionSprite1
  77.   global gArtPositionSprite2
  78.   global gArtPositionSprite3
  79.   global gArtPositionSprite4
  80.   global gCurrentButton
  81.   
  82.   if(gArtPlay = FALSE and gCurrentButton = 5) then
  83.     --    set the castNum of sprite gSpriteThumb to the number of cast "MARKER.PIC"
  84.     --    updateStage
  85.     --    
  86.     --    set place = (the mouseH  -  gArtFrameBarH) / gArtFrameBarStep
  87.     --    set gArtFrame = place +1
  88.     --    set the locH of sprite gArtSprite1 to  getAt(getAt(gArtPositionSprite1, gArtFrame), 1)
  89.     --    set the locV of sprite gArtSprite1  to  getAt(getAt(gArtPositionSprite1, gArtFrame), 2)
  90.     --    
  91.     --    set the locH  of sprite gArtSprite2  to  getAt(getAt (gArtPositionSprite2, gArtFrame), 1)
  92.     --    set the locV  of sprite gArtSprite2  to  getAt(getAt (gArtPositionSprite2, gArtFrame), 2)
  93.     --    
  94.     --    set the locH  of sprite gArtSprite3 to  getAt(getAt (gArtPositionSprite3, gArtFrame), 1)
  95.     --    set the locV  of sprite gArtSprite3  to  getAt(getAt (gArtPositionSprite3, gArtFrame), 2)
  96.     go to  marker(0) + 1 + gArtFrame
  97.   end if
  98.   
  99. end